package ua.maxicash.dao;

import ua.maxicash.util.JqgridQuery;
import ua.maxicash.vo.SystemUser;
import ua.maxicash.vo.Work;
import ua.maxicash.vo.Worker;

import java.util.Set;

public interface AppDao {

    Set<Work> getActiveWorks();
    Set<Work> getAllWorks();
	Set<Work> getWorksByJqgridQuery(JqgridQuery jq);
	Set<Worker> getWorkersByJqgridQuery(JqgridQuery jq);
	Set<Worker> getAllWorkers();
    SystemUser getSystemUserByEmail(String email);
    SystemUser getSystemUserById(Long id);

    //@Cacheable(cacheName="likesOfSystemUser")
	Set<SystemUser> getLikesOfSystemUser(Long idUser, Integer amount);
	Set<SystemUser> getAllLikesOfSystemUser(String email);
    Set<SystemUser> getAllLikesOfSystemUser(Long idUser);

   // @TriggersRemove(cacheName="likesOfSystemUser", removeAll=true)
	void like(String myEmail, String hisEmail);
	//void saveWorkersFreeTime(Set<WorkersFreeTime>)

   // @TriggersRemove(cacheName="likesOfSystemUser", removeAll=true)
    void removeFromLikes(Long idUser, Long idLike);
}
